          <div id = "schedule">
            <div class = "error">{$error}</div>
            <table cellspacing="0" cellpadding="0" border="0">
              <thead>
                <tr>
                  <th></th>
                  {section name=loop loop=$dates}
                  {foreach from=$dates[loop] item=day key=date}
                  <th>{$day}<br /><span>{$date}</span></th>
                  {/foreach}
                  {/section}
                </tr>
              </thead>
				              
              <tbody>
                {foreach from=$schedule_rows item=date key=shift}
                <tr>
                  <th>{$shift}</th>
                  {foreach from=$date key =thedate item=people}
                    {include file = "schedule-td.tpl"}
                  {/foreach}
                </tr>
              {/foreach}
              </tbody>
            </table>

            <form action="schedule.php" id="change-week" method="POST">
              <input type="button" class="default-button {if !$prev_id}hidden{/if}" name="back" id="prev_schedule" value="&laquo;" autocomplete="off" />
              <input type="hidden" id="prev_id" value="{$prev_id}" />
              <input type="button" class="default-button {if !$next_id}hidden{/if}" name="forward" id="next_schedule" value="&raquo;" autocomplete="off" />
              <input type="hidden" id="next_id" value="{$next_id}" />
            </form>
            <form action="export-schedule.php" id="export-excel" method="POST">
              <input type="hidden" id="current_id" name = "id" value="{$id}"/>
              <input type="submit" class = "default-button" name = "submit_1" value = "Download Excel Schedule"/>
            </form>
          </div>
